import logging
def log_set():
    logging.basicConfig(filename='log.txt', filemode='w+', level=logging.DEBUG, format='%(levelname)s->%(asctime)s->%(message)s')
import yagmail
def send_mail(filepath):
    mail=yagmail.SMTP(user='2539722579@qq.com',password='uncucoutvhxrdicg',host='smtp.qq.com')
    mail.send(to='2539722579@qq.com',subject='测试报告',contents='今日报告，请查看',attachments=filepath)


import yaml


def get_data_from_yaml(filepath):
    with open(filepath, 'r', encoding='utf-8') as f:
        return yaml.safe_load(f)
def get_data_from_yaml_new(filepath):
    with open(filepath,'r',encoding='utf-8') as f:
        return yaml.safe_load(f)
data=get_data_from_yaml('../lianxi/data/data.yaml')
print(data)
